<template>
    <div class="gitee">
        <el-header>
            <el-link type="primary" v-if=!isLogin
                href="https://gitee.com/oauth/authorize?client_id=3f86a28a47d940609802c9c099c2cb54b5e6039a4aeda4d9f409b755f6d3d617&redirect_uri=http://127.0.0.1:8840/api/oauth/oauth2.0/gitee/success&response_type=code">
                请先登录</el-link>
            <el-button v-else @click="quit">退出登录</el-button>
        </el-header>
    </div>
</template>


<script>
// import api from '@/api/api'
import axios from 'axios'

export default {
    data() {
        return {
            isLogin: !!localStorage.getItem('token')
        }
    },
    methods: {
        quit(){
            localStorage.removeItem("token");
            this.isLogin=false;
        }
    }
}
</script>
  